package com.youjia.exception;

import com.youjia.vo.SysResult;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class MyException {

    @ExceptionHandler(RuntimeException.class)
    public Object catchException(Exception e) {
        e.printStackTrace();
        return SysResult.fail();
    }
}
